package fun.chutianshu;

public class Turtle extends Pet{

    private int shellNum;

    public Turtle(int age, String name, int hp, String color, int ap, int shellNum) {
        super(age, name, hp, color, ap);
        this.shellNum = shellNum;
        this.setHp(this.getHp()*this.shellNum);
        this.setInitHp(this.getHp());
    }
    public Turtle(){}

    public int getShellNum() {
        return shellNum;
    }

    public void setShellNum(int shellNum) {
        this.shellNum = shellNum;
    }

    public Turtle(int shellNum) {
        this.shellNum = shellNum;
    }

    @Override
    public void printPet() {
        System.out.println(this.toString());
    }

    @Override
    public String toString() {
        return "Turtle{" +
                "shellNum=" + shellNum +
                '}';
    }

    @Override
    public void play() {
        System.out.println("玄武 "+this.getName()+" 正在跟兔子赛跑.......");
    }

}
